package com.sasis.model;
// Generated 2007-5-28 18:50:37 by Hibernate Tools 3.1.0.beta4

import java.sql.Date;
import java.sql.Timestamp;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="MSG_RELEASE"
 *     
 */

public class MsgRelease extends com.sasis.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private String title;
    private String content;
    private Integer operator;
    private Timestamp operatime;
    private Integer msgTypeId;
    private Integer keepDay;
    private String userName;
    private String cnName;
    private String msgTypeName;
    // Constructors

    public String getMsgTypeName() {
		return msgTypeName;
	}


	public void setMsgTypeName(String msgTypeName) {
		this.msgTypeName = msgTypeName;
	}


	public String getCnName() {
		return cnName;
	}


	public void setCnName(String cnName) {
		this.cnName = cnName;
	}


	public String getUserName() {
		return userName;
	}


	public void setUserName(String userName) {
		this.userName = userName;
	}


	/** default constructor */
    public MsgRelease() {
    }

    
    /** full constructor */
    public MsgRelease(String title, String content, Integer operator, Timestamp operatime, Integer msgTypeId, Integer keepDay) {
        this.title = title;
        this.content = content;
        this.operator = operator;
        this.operatime = operatime;
        this.msgTypeId = msgTypeId;
        this.keepDay = keepDay;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="ID"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="TITLE"
     *             length="100"
     *         
     */

    public String getTitle() {
        return this.title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    /**       
     *      *            @hibernate.property
     *             column="CONTENT"
     *             length="1024"
     *         
     */

    public String getContent() {
        return this.content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    /**       
     *      *            @hibernate.property
     *             column="OPERATOR"
     *             length="22"
     *         
     */

    public Integer getOperator() {
        return this.operator;
    }
    
    public void setOperator(Integer operator) {
        this.operator = operator;
    }
    /**       
     *      *            @hibernate.property
     *             column="OPERATIME"
     *             length="7"
     *         
     */

    public Timestamp getOperatime() { 
        return this.operatime;
    }
    
    public void setOperatime(Timestamp operatime) {
        this.operatime = operatime;
    }
    /**       
     *      *            @hibernate.property
     *             column="MSG_TYPE_ID"
     *             length="22"
     *         
     */

    public Integer getMsgTypeId() {
        return this.msgTypeId;
    }
    
    public void setMsgTypeId(Integer msgTypeId) {
        this.msgTypeId = msgTypeId;
    }
    /**       
     *      *            @hibernate.property
     *             column="KEEP_DAY"
     *             length="22"
     *         
     */

    public Integer getKeepDay() {
        return this.keepDay;
    }
    
    public void setKeepDay(Integer keepDay) {
        this.keepDay = keepDay;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("title").append("='").append(getTitle()).append("' ");			
      buffer.append("content").append("='").append(getContent()).append("' ");			
      buffer.append("operator").append("='").append(getOperator()).append("' ");			
      buffer.append("operatime").append("='").append(getOperatime()).append("' ");			
      buffer.append("msgTypeId").append("='").append(getMsgTypeId()).append("' ");			
      buffer.append("keepDay").append("='").append(getKeepDay()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof MsgRelease) ) return false;
		 MsgRelease castOther = ( MsgRelease ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && ( (this.getTitle()==castOther.getTitle()) || ( this.getTitle()!=null && castOther.getTitle()!=null && this.getTitle().equals(castOther.getTitle()) ) )
 && ( (this.getContent()==castOther.getContent()) || ( this.getContent()!=null && castOther.getContent()!=null && this.getContent().equals(castOther.getContent()) ) )
 && ( (this.getOperator()==castOther.getOperator()) || ( this.getOperator()!=null && castOther.getOperator()!=null && this.getOperator().equals(castOther.getOperator()) ) )
 && ( (this.getOperatime()==castOther.getOperatime()) || ( this.getOperatime()!=null && castOther.getOperatime()!=null && this.getOperatime().equals(castOther.getOperatime()) ) )
 && ( (this.getMsgTypeId()==castOther.getMsgTypeId()) || ( this.getMsgTypeId()!=null && castOther.getMsgTypeId()!=null && this.getMsgTypeId().equals(castOther.getMsgTypeId()) ) )
 && ( (this.getKeepDay()==castOther.getKeepDay()) || ( this.getKeepDay()!=null && castOther.getKeepDay()!=null && this.getKeepDay().equals(castOther.getKeepDay()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + ( getTitle() == null ? 0 : this.getTitle().hashCode() );
         result = 37 * result + ( getContent() == null ? 0 : this.getContent().hashCode() );
         result = 37 * result + ( getOperator() == null ? 0 : this.getOperator().hashCode() );
         result = 37 * result + ( getOperatime() == null ? 0 : this.getOperatime().hashCode() );
         result = 37 * result + ( getMsgTypeId() == null ? 0 : this.getMsgTypeId().hashCode() );
         result = 37 * result + ( getKeepDay() == null ? 0 : this.getKeepDay().hashCode() );
         return result;
   }   





}
